package com.ruoyi.dataStatistics.controller;


import cn.dev33.satoken.annotation.SaCheckPermission;
import com.ruoyi.common.core.domain.PageQuery;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.dataBase.service.IIndustrialTransportProjectService;
import com.ruoyi.dataStatistics.domain.*;
import com.ruoyi.dataStatistics.service.BigScreenStatisticsService;
import com.ruoyi.reportInfo.domain.bo.*;
import com.ruoyi.reportInfo.domain.vo.*;
import com.ruoyi.reportInfo.service.*;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

import javax.validation.constraints.NotNull;

@Validated
@RequiredArgsConstructor
@RestController
@RequestMapping("/bigScreenStatistics")
@Tag(name = "产业地图数据大屏", description = "产业地图数据大屏相关接口")
public class BigScreenStatisticsController {

    private final BigScreenStatisticsService bigScreenStatisticsService;

    private final IIndustrialStationService iIndustrialStationService;

    private final IIndustrialParkService iIndustrialParkService;

    private final IIndustrialTransportProjectService iIndustrialTransportProjectService;

    private final IIndustrialLogisticsCompanyService iIndustrialLogisticsCompanyService;

    private final IIndustrialLogisticsCompanyLineService iIndustrialLogisticsCompanyLineService;

    private final IIndustrialLogisticsCompanyStoreService iIndustrialLogisticsCompanyStoreService;

    /*******************************************************物流基础设施****************************************************************/

    @GetMapping("/getLogisticsInfrastructureReport")
    @Operation(summary = "物流基础设施统计报表视图接口", description = "用于查询物流基础设施统计报表视图")
    public R<LogisticsInfrastructureReportVo> getLogisticsInfrastructureReport() {
        return R.ok(bigScreenStatisticsService.getLogisticsInfrastructureReport());
    }

    /**
     * 查询场站基本信息列表
     */
    @GetMapping("/industrialStationPageList")
    @Operation(summary = "查询场站基本信息列表", description = "用于查询场站基本信息列表")
    public TableDataInfo<IndustrialStationVo> industrialStationPageList( @RequestBody IndustrialStationBo bo, PageQuery pageQuery) {
        return iIndustrialStationService.industrialStationPageList(bo, pageQuery);
    }

    /**
     * 场站物流能力分析
     */
    @GetMapping("/industrialStationAnalysis")
    @Operation(summary = "查询场站物流能力分析", description = "用于查询场站物流能力分析图")
    public R<IndustrialStationAnalysisVo> industrialStationAnalysis( @RequestBody IndustrialStationBo bo) {
        return R.ok(iIndustrialStationService.industrialStationAnalysis(bo));
    }


    /**
     * 查询园区信息列表
     */
    @GetMapping("/industrialParkPageList")
    @Operation(summary = "查询园区信息列表", description = "用于查询园区信息列表")
    public TableDataInfo<IndustrialParkVo> industrialParkPageList( @RequestBody IndustrialParkBo bo, PageQuery pageQuery) {
        return iIndustrialParkService.industrialParkPageList(bo, pageQuery);
    }

    /**
     * 查询园区信息列表
     */
    @GetMapping("/logisticsParkAnalysis")
    @Operation(summary = "物流园区货运量分析", description = "用于查询物流园区货运量分析")
    public R<IndustrialParkAnalysisVo> logisticsParkAnalysis( @RequestBody IndustrialParkBo bo) {
        return R.ok(bigScreenStatisticsService.logisticsParkAnalysis(bo));
    }

    /**
     * 物流项目建设情况
     */
    @GetMapping("/industrialProjectAnalysis")
    @Operation(summary = "物流项目建设情况", description = "用于查询物流项目建设情况")
    public R<industrialProjectAnalysisVo> industrialStationAnalysis() {
        return R.ok(iIndustrialTransportProjectService.industrialStationAnalysis());
    }



    /*******************************************************物流资源服务****************************************************************/

    /**
     * 查询物流企业信息列表
     */
    @Operation(summary = "查询物流企业信息列表", description = "用于查询物流企业信息列表")
    @GetMapping("/industrialCompanyPageList")
    public TableDataInfo<IndustrialLogisticsCompanyVo> industrialCompanyPageList(@RequestBody IndustrialLogisticsCompanyBo bo, PageQuery pageQuery) {
        return iIndustrialLogisticsCompanyService.industrialCompanyPageList(bo, pageQuery);
    }

    /**
     * 查询物流企业专线列表
     */
    @Operation(summary = "查询物流企业专线列表", description = "查询物流企业专线列表")
    @GetMapping("/industrialCompanyLinePageList")
    public TableDataInfo<IndustrialLogisticsCompanyLineVo> industrialCompanyLinePageList(@RequestBody IndustrialLogisticsCompanyLineBo bo, PageQuery pageQuery) {
        return iIndustrialLogisticsCompanyLineService.industrialCompanyLinePageList(bo, pageQuery);
    }

    /**
     * 查询物流企业仓库列表
     */
    @Operation(summary = "查询物流企业仓库列表", description = "查询物流企业仓库列表")
    @GetMapping("/industrialCompanyStorePageList")
    public TableDataInfo<IndustrialLogisticsCompanyStoreVo> industrialCompanyStorePageList(@RequestBody IndustrialLogisticsCompanyStoreBo bo, PageQuery pageQuery) {
        return iIndustrialLogisticsCompanyStoreService.industrialCompanyStorePageList(bo, pageQuery);
    }

    @GetMapping("/getLogisticServiceResourcesReport")
    @Operation(summary = "物流服务资源视图接口", description = "用于查询物流服务资源视图")
    public R<LogisticServiceResourcesVo> getLogisticServiceResourcesReport() {
        return R.ok(bigScreenStatisticsService.getLogisticServiceResourcesReport());
    }

}
